home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d22 / chg20.arc / CHG.DOC next >
Encoding:
Text File  |  1990-11-10  |  6.5 KB  |  182 lines

  1.                                 CHG 2.0
  2.  
  3.                           A Program to Change
  4.                    File Attributes, Dates, and Times
  5.  
  6.                                   by
  7.                                Bob Eyer
  8.                              [73230,2620]
  9.  
  10.                              Nov 11, 1990
  11.  
  12.  
  13.      Syntax:
  14.  
  15.      CHG [filename/wildcard] [option-string]
  16.  
  17.                                 The option-string may be:
  18.                                 -  an attribute or combination thereof
  19.                                 -  a date
  20.                                 -  a time
  21.                                 (see discussion below)
  22.  
  23.      Comments on Filename/wildcard:
  24.      ------------------------------
  25.      -  The  filename  or wildcard argument may either have no drive or
  26.      path specifiers or may be fully pathed, as in a filespec.  With no
  27.      path or drive information, CHG assumes the default drive and path.
  28.  
  29.      However,  if  the  user  wishes to change all files in the default
  30.      path, he must either use
  31.  
  32.      CHG *.* option-string
  33.  
  34.      or
  35.  
  36.      CHG . option-string
  37.  
  38.      NEW FEATURE:
  39.      -----------
  40.      CHG  also  supports  normal  DOS  shortcuts,  such  as  "..\." and
  41.      "..\XYZ\." in place of the usual format for wildcards.
  42.  
  43.  
  44.  
  45.      Comments on the option-string
  46.      -----------------------------
  47.      There are three mutually exclusive types of option-strings:
  48.  
  49.        1) Attribute-setting option strings.
  50.           ---------------------------------
  51.           These  must  contain  the  letters  R,  H,  S, A, or X in any
  52.           combination or order with no other imbedded characters.   For
  53.           example,
  54.  
  55.           CHG XYZ R
  56.  
  57.           changes file XYZ to Read only.  Another example:
  58.  
  59.           CHG *.SYS RHSA
  60.           or
  61.           CHG *.SYS SHRA
  62.  
  63.           changes  all  '.SYS'  files  in the default directory to Read
  64.           only Hidden System Archive.  Another example:
  65.  
  66.           CHG \SYS\*.DOC X
  67.  
  68.           resets the attributes of all DOC files in the  SYS  directory
  69.           on the default drive.
  70.  
  71.           No special parameter marker, such as a dash or  a  slash,  is
  72.           needed   to   show   that  such  option  strings  are  indeed
  73.           attributes.  This fact makes CHG easier to use than ATTRIB.
  74.  
  75.           CHG,  unlike  ATTRIB,  will  accept  dashes or underscores in
  76.           filenames or wildcards with no difficulty.  This  is  related
  77.           to  the  fact  that  no dashes are used to identify attribute
  78.           options.
  79.  
  80.           What happens if no option string is mentioned:
  81.           ---------------------------------------------
  82.           CHG will simply provide a complete report of everything  that
  83.           it  can  change  on  each  file selected (the date, time, and
  84.           attribute), if no option-string is mentioned.   In  contrast,
  85.           ATTRIB  will  only  report  the  attributes  of  the files in
  86.           question.
  87.  
  88.  
  89.        2) Date-setting option-strings.
  90.           ---------------------------
  91.           If you wish to change the date of a file or series  of  files
  92.           determined  by a wildcard mask, just use your desired date as
  93.           your option-string.  Thus,
  94.  
  95.           CHG RENAME.COM 2/1/89
  96.  
  97.           will  change  the  date  stamp  of  RENAME.COM  to 02-01-1989
  98.           without changing the time  stamp  or  the  attribute.   Here,
  99.           slashes  in the date parameter are mandatory (this is how CHG
  100.           recognises your option-string as a date).
  101.  
  102.           You may also use the complete form.  Thus:
  103.  
  104.           CHG RENAME.COM 02/01/1989, or
  105.  
  106.           CHG RENAME.COM 02/01/89
  107.  
  108.           will also redate RENAME.COM to 02-01-1989.
  109.  
  110.           A new and useful feature:
  111.           -------------------------
  112.           If you use TO/DAY as your option-string, CHG will change your
  113.           file(s) to the current DOS date in your computer.   Thus,  if
  114.           today is 11-11-90, then
  115.  
  116.           CHG BREAK.TXT to/day
  117.  
  118.           will change the date stamp of BREAK.TXT to 11-11-1990.
  119.  
  120.           Caveat:
  121.           If you attempt to change the date/time stamp  of  a  readonly
  122.           file,  no date/time stamp change will occur.  You can see the
  123.           effect of this by watching the report display  on  a  mix  of
  124.           read only and archive (or reset) files.
  125.  
  126.        3) Time-setting option strings.
  127.           ---------------------------
  128.           Here, CHG uses the  colon  (':')  to  recognise  your  option
  129.           string  as  a  time.  CHG updates the time-stamp of a file to
  130.           one-minute precision.  For example,
  131.  
  132.           CHG ABC.EXE 5:40
  133.  
  134.           will change the time-stamp of ABC.EXE to 05:40 A.M.
  135.  
  136.           CHG ABC.EXE 14:20
  137.  
  138.           will change the time-stamp to 2:20 P.M.
  139.  
  140.           A new feature:
  141.           -------------
  142.           If you use RIGHT:NOW as your option string, CHG will use  the
  143.           current time in DOS as the parameter to use for time-stamping
  144.           your file.  For example, if it is now 4:31 P.M., executing
  145.  
  146.           CHG *.EXE right:now
  147.  
  148.           will  change  the  time-stamp of all EXE files in the default
  149.           directory to 4:31 P.M.  (16:31 hours).
  150.  
  151.           Caveat:
  152.           If you attempt to change the date/time stamp  of  a  readonly
  153.           file,  no date/time stamp change will occur.  You can see the
  154.           effect of this by watching the report display  on  a  mix  of
  155.           read only and archive (or reset) files.
  156.  
  157.      Use of CHG to read file information
  158.      -----------------------------------
  159.      As  stated  previously,  CHG  displays  the  current values of all
  160.      variables it can change if  executed  without  the  option-string.
  161.      For example,
  162.  
  163.      CHG *.EXE
  164.  
  165.      will present a list of all EXE files  in  the  default  directory,
  166.      listing  the  date/time stamp, as well as the DOS attribute number
  167.      (decimal) and a description of the attribute(s).
  168.  
  169.      Users may contact me at Compuserve through userid [73230,2620].
  170.  
  171.      DISCLAIMER:
  172.      ==========
  173.      This  program is circulated as public domain without any guarantee
  174.      or warranty; and the user, by downloading  this  program,  or  any
  175.      variant  thereof  or by receiving it or any of its versions in any
  176.      other form, agrees to accept full responsibility for its use.   It
  177.      is  therefore understood that the user accepts this program or any
  178.      previous version as is.
  179.  
  180.      -------------------------------------------------------------
  181.      End of documentation.
  182.